package com.lpit.controller;

import com.lpit.dto.UserAndTableTheBehaviorDto;
import com.lpit.pojo.Article;
import com.lpit.result.ResponseResult;
import com.lpit.service.CollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户对文章的收藏行为
 * @author Administrator
 */
@RestController
public class CollectController {
    @Autowired
    private CollectService collectService;
    /**
     * 用户对文章收藏
     * @param userAndTableTheBehaviorDto
     * @return ResponseResult<Integer>
     */
    @GetMapping("/collect")
    public ResponseResult<Integer> collect(UserAndTableTheBehaviorDto userAndTableTheBehaviorDto){
        return collectService.collect(userAndTableTheBehaviorDto);
    }

    /**
     * 查看收藏内容
     * @return
     */
    @GetMapping("/getCollect.do")
    public ResponseResult<Article> getCollect(Integer userId){
        return null;
    }

    /**
     * 删除收藏内容
     * @return
     */
    @DeleteMapping("/delCollect.do")
    public ResponseResult<Integer> delCollect(UserAndTableTheBehaviorDto userAndTableTheBehaviorDto){
        return null;
    }
}
